package com.graduation.ucenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.base.model.R;
import com.graduation.ucenter.model.po.Authority;
import com.graduation.ucenter.model.po.Role;

import java.util.List;

public interface RoleService extends IService<Role> {

    R<List<Role>> listRole(Integer page, Integer pageSize, Role role);


    R<List<Role>> listRoleByUserId(Integer userId);

    R<List<Authority>> listAuthorityByRoleId(Integer roleId);

    R<String> addBindAuthorityByRoleId(Integer authorityId, Integer roleId);

    R<String> removeBindAuthorityByRoleId(Integer roleId, Integer authorityId);

    R<String> addRole(Role role);
}
